<div id="templatemo_content_right">
  <div sty20le="float:left;width:700px;height:445px;" >
  <div class="templatemo_product_box" style="float:left;width:600px;height:445px;">
            	<h1>Exist <span> Purchase</span></h1>
     


<?php

//check if data is set 
 if  (!isset($_POST["quantity"])             || !isset($_POST["purchase_price"])||
      !isset($_POST["total_purchase_price"]) || !isset($_POST["dop"])           ||
	  !isset($_POST["supplier"])             || !isset($_POST["exist_product_id"]) ){
	
	
echo 'Please Fill in all Fields !<br/>
	                     <a href="cp.php">Back To CP</a>
' ; 
}
	else {
	
	
$exist_product_id=$_POST['exist_product_id'];
$quantity=$_POST['quantity'];
$purchase_price=$_POST['purchase_price']; 
$total_purchase_price=$_POST['total_purchase_price'];
$dop=$_POST['dop'];
$supplier=$_POST['supplier'];






//create object of admin 
// call the fn to add 
require_once('Admin.php');

$admin= new Admin;

$admin->Add_ExistProduct_Purchase(
$exist_product_id,
$quantity,
$purchase_price,
$total_purchase_price,
$dop,
$supplier);






	}   
?>


				<!-- php end  -->
				
</div>
                      </div>
    
            
            <div class="cleaner_with_height">&nbsp;</div>
           <!-- code for advertising image  -->           
		  
			
			
        </div> <!-- end of content right -->
		
		